1. Field of the Invention
This invention relates to processing logical units of work and more particularly to methods for encapsulating operations comprising logical units of work into a single business object.
2. Description of the Related Art
One of the fundamental challenges in enterprise application integration is enabling smooth data flow between disparate applications. To improve the flow of data, one primary objective when integrating enterprise applications is to simplify the interaction with an enterprise application to improve the integration model already published for the application. One interaction that may create special challenges when integrating with enterprise information systems in that of transaction processing.
A transaction is an indivisible set of operations forming a logical unit of work that must be executed in an enterprise information system (EIS) either in its entirety or not at all. Transactions maintain data integrity and ensure that the data in an EIS will always be in a consistent state. A transaction should normally end with either a COMMIT or a ROLLBACK operation. If a transaction is successful, changes made to the EIS are committed (i.e., made permanent). If the transaction fails, changes to the EIS are rolled back to their original state.
For example, where a database or other data repository handles financial accounts, money may be transferred between accounts. This requires a debit from one account and a credit to another. Before the debit or credit occurs, the database is in a consistent state. However, in the interval after the debit has occurred but before the credit has occurred, the database is in an inconsistent state. Absent protective measures, a database failure or other interruption during this interval could result in the performance of only half of the transaction, potentially impairing the data integrity of the database.
In some cases where a client interfaces with an enterprise information system, a single client must call or execute the entire set of operations making up a transaction in order to successfully complete the transaction. For example, to change the address in an employee record, the client locks the record, makes the desired address change, and then unlocks the record. While the record is locked, other clients are unable to access the record. If more than one client were able to access and modify the record concurrently, problems could result such as retrieving bad data or deleting data that the other client needs.
Transactions requiring execution by a single client may create a special problem where enterprise information systems are tied into an integrated “hub-and-spoke” environment. Instead of being directly connected, clients and enterprise information systems communicate with a centralized hub, also referred to as an integration broker. In such a system, clients and enterprise information systems may communicate and exchange data through the integration broker without having any knowledge of the other's data conventions and processing requirements.
Due to the architecture of a hub-and-spoke integration system, the integration broker may process each operation of a transaction as a separate task using different threads. However resource locking requirements combined with distribution of operations for a single transaction among multiple clients or threads, may prevent a transaction from being processed. Thus, transaction processing may be problematic in a hub-and-spoke architecture where transactions are routed through a centralized integration broker.
Accordingly, what are needed are methods for facilitating transaction processing in an integrated environment. Further needed are methods for transmitting an entire transaction over a single communication connection in an integrated environment. Such methods are disclosed herein.